;
;`-',
;.-.;""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""";, ,;
;`-';           Time Baby V15d                  /\    |\           For Sony Playstation Portable    ;`-';
;.-.;      Talking Clock Program with          //\/''/''/        with Homebrew Compatible Firmware  ;.-.;
;`-';  Graphic Lunar Information Display,     //''||' ||           First Release 20th August '06    ;`-';
;.-.;       Sunrise and Sunset times.        |/   |/  |/2008!         Last update 20th May '08      ;.-.;
;`-';                                                                                               ;`-';                                                                                                     '
;"""'"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'"""'


Hi Guys,
The Time Baby program is primarily a talking graphic alarm clock program for the Sony Playstation Portable.
Time Baby features Lunar, and Sunrise / Sunset information that may be handy for mountaineering, camping,
bushwalking, hunting, fishing, photography, or for just avoiding driving during Sunset!

I have also included a graphic world time clock that can display the time virtually anywhere,
and a talking heart rate monitor for those who have suitable peripheral hardware.

Lastly, an mp3 player with playlist support was introduced for the V12 series of program releases.

This is not my first PSP clock, or even my first talking clock, but it is at least the neatest PSP clock
I have seen so far, and has many features never before seen in any PSP program.

Time Baby is written in C, with the free PSP SDK (thanks to ps2dev.org).


       **************************************** Disclaimer ******************************************


The Time Baby program is provided for free, as it is, without warranty of any kind, either express or
implied, including, but not limited to, the implied warranties of fitness for a purpose.
Without limiting the foregoing, the author of this program makes no warranty that:

   1. the software will meet your requirements
   2. the software will be uninterrupted, or free of errors.
   3. the results that may be obtained from the use of the software will be accurate or reliable.
   4. any errors found in the program will be corrected.
   5. documentation provided with the program will be accurate, complete, or up to date.

Use of this program is at your own discretion and risk and with agreement that you are responsible for any
damages or loss of data that results from such activities.

The author also disclaims responsibility for possible damages caused by unofficial hardware peripherals.
It would not be possible for the author to guarantee the quality of everyone's work in producing them.
Support for such devices provided by the program is solely intended for those qualified to produce them.


       ********************************* Grant Of Software License **********************************


The Time Baby Program is free to use, but I retain ownership of my software, and grant of license to use
it is under identical terms of GPS Trackmaker license agreement (reproduced in part with permission),
that pertain to preservation of protected ecosystems. View the entire agreement for GPS Trackmaker:
http://www.gpstm.com/downloadscontract.php

"LICENSE GRANT

The author grants a non-exclusive license to use the program, free of charge, if the user:
Does not use the program for illegal purposes;
does not practice activities that destroy or degrades the environment;
does not practice polluting activities;
does not throw trash on the ground or through the cars windows;
when going to the beach and creeks takes his trash back until finding a trash collector;
does not practice any activities that hurts animals, like hunting, out-of-season fishing, pigeon shooting,
dog fight, etc.;
does not buy wild animals that, by law, may not be created out of their natural environment;
has ecological conscience and protects nature.
People that for any reason do not fit the conditions above, are expressly forbidden to use the program."

License to use Time Baby versions later than Version 3b, also require adhesion to the following terms:

When the user visits a Beach or other body of water, National Park or other protected environment,
he or she leaves no damage to live vegetation, leaves no unnatural polluting material, or litter,
and removes non-combustible material from fireplaces, or litter that may have been left by other people
if it is reasonable to store and carry it with your own rubbish.

This agreement applies whether or not the program's source code is ever released to the public.


       *************************************** Installation ******************************************

IMPORTANT!
If you are upgrading from any previous version of Time Baby, delete the entire Time Baby program folder!

To Install the Time Baby program, copy the program folder to the PSP/GAME150 folder of your PSP.
Now you should be able to launch the program from the Game menu.

Time Baby is tested with a 3.52 M33 firmware PSP unit. This is the last true 1.50 kernel hybrid firmware.
the program is known to work with other firmwares as well, but I have not personally tested these.

The program should also work with original 1.50 firmware as long as the program folder is kxploited,
but again, I have not tested this for myself.


       ****************************************** Usage **********************************************


Prior to Launching Time Baby, be sure the PSP unit's time zone is set to your location. At program startup,
you will see an intro screen giving credit where it is due. Immediately after this, the time is announced,
and displayed in bold graphic numbers. As seen in the picture "Button Assignment.gif", there functions are
controlled with the D-pad and various other buttons.

Pressing either the CROSS button, or LEFT or RIGHT SHOULDER buttons will cause the program to announce the time
in a CD quality female voice. This can be done in any mode, and does not cause any change in program operation.
If you quickly press the LEFT and RIGHT SHOULDER buttons at the same time while the time isn't being announced,
an echo effect will be heard whenever the time is announced. This echo setting is saved with user configuration.

Pressing either UP or DOWN on the D-pad will cycle through sub display modes. The thirteen sub display modes
are alarm set, moon phase/calendar, time announcement setting, colour adjustment mode, day of the week mode,
Sunrise/Sunset screen, World Time mode, heart rate monitor mode, Solar Power Monitor mode, Long Time Display
mode, Stopwatch mode, MP3 Player mode, and Plasma/Fire effect display mode where GPS or manual time set modes
can also be activated.

Pressing LEFT or RIGHT on the D-pad while in the alarm sub display mode will respectively decrement or increment
the alarm time. The longer you hold down either of these buttons, the faster the alarm time will change.
You can use the CIRCLE button to cycle through the siren, mp3 alarm mode, or alarm triggered infrared control modes,
camera mode, or deactivate alarm. When the alarm time occurs, the time will be announced if the alarm is activated.

If the alarm is in mp3 mode, the time is not announced at alarm time, and the mp3 playlist will resume from
the next track if the PSP was suspended with the START button while a playlist was active.
If no playlist is active at alarm time, the siren will sound as in the normal alarm mode.

If the alarm is in alarm triggered infrared remote control mode, the TRIANGLE button can be used to test the
infrared remote control feature as it instantly sends the control code as the button is pressed. A sound is heard
as the button is pressed to verify this.

If the alarm is in camera mode, Time Baby will send five infrared control codes for a Pentax Optio digital camera
spaced five seconds apart beginning from from the alarm time. The codes will cause the camera to take five pictures
provided that the batteries are of sufficient strength to charge the flash (if active) within five second intervals.
The TRIANGLE button can be used to test this feature. The Pentax Optio infrared "shoot" code is hard coded into the
Time Baby application, and is independent of the infrared code stored in the program directory.

Pressing the START button will cause the PSP unit to enter suspend mode (often incorrectly called standby).
This is the same condition as when you flick the power switch up for a short time. Time Baby will resume at
the alarm time that was set, and sound a loud alarm at that time, as long as the volume is turned up.
You can reset the alarm by pressing the CROSS, LEFT or RIGHT SHOULDER, TRIANGLE, SQUARE, or CIRCLE buttons.
The program will now operate as it was before the START button was pressed.

Pressing the SELECT button will cause the PSP unit to enter standby mode (often incorrectly called power off).
This is the same condition as when you hold the power button up for about ten seconds. The PSP unit's built in
clock still operates in this condition (or it would forget the time). When the alarm time arrives, the PSP
unit will auto start, and launch the XMB menu. If you are using a DAX custom (OE) firmware that is set to auto
boot a homebrew application, then that application will be auto booted just as it would be when turning on the
PSP unit. This could be some other program that makes a noise, plays an mp3, or does anything else.

Pressing the RIGHT arrow while in moon phase sub display mode will show a preview of the moon phase for the
next night, and subsequent presses will advance the preview by one day for every button push.
Moon rise and set times will also be updated to match the preview.
Pressing the LEFT arrow button has the opposite effect. the display will show the moon phase on days past.
Pressing CIRCLE in this mode will reset the preview mode to the current day.
Pressing TRIANGLE in this mode will show the moonphase displayed as text on the screen.
Pressing SQUARE in this mode will set the location for the moon rise/set calculation to that set by moving the
pointer on the World Time Clock map to the desired location. The location can be set manually in Sunset mode,
and is saved with user options.

Pressing the RIGHT or LEFT arrow on the D-pad while in Sunrise/Sunset sub display mode will show preview rise
and set times for different days. The preview mode is reset when you move out of this screen.

Pressing the CIRCLE button while in Sunrise/Sunset sub display mode will toggle the Sunrise rooster chime.
If the rooster chime is active, a rooster will sound once at sunrise every day for the location that is set.
The rooster chime will work in all sub display modes, and it's activation status is saved with user options.
The rooster chime does not wake the PSP unit from suspend or standby modes.

Moving the analogue controller while in Sunrise/Sunset sub display mode will allow the user to adjust the
coordinates for the displayed location, or set their user defined location. The user defined location is saved
with user options. If you find that your location is close to one of the presets, you can begin setting the
user defined location from any of the presets to save time.

Pressing the SQUARE button while in Sunrise/Sunset sub display mode will set the user defined location to the
position on the map that the crosshair is sitting in the world time screen. If you know your coordinates
more precisely, you can further adjust the coordinates with the analogue controller as described above before
you save your settings.

Pressing the TRIANGLE button while in Sunrise/Sunset sub display mode will activate the Sunset monitor mode.
The main time display will now show a countdown to Sunset, and the time will now be seen counting backwards.
Any time announcements will give this countdown time instead of the time of day while the Sunset monitor mode
is active. If the alarm is active, the alarm will sound at Sunset instead of the time displayed on the alarm
screen that was set by the user. Once Sunset time is reached (display shows 0:00:00), the Sunset monitor mode
will terminate, and normal time of day mode will auto resume.
Sunset monitor mode may be cancelled by pressing the CIRCLE button while in Sunrise/Sunset sub display mode,
or by pressing the TRIANGLE button again.

Pressing the RIGHT or LEFT arrow on the D-pad while in time announcement sub display mode will adjust the
interval between auto time announcements. Auto time announcement may also be turned off this way.
The auto time announcement interval, or deactivation status, is saved with user options.

Pressing the CIRCLE button while in heart rate monitor mode will toggle the heart rate monitor on or off.
The running man icon indicates that the program is listening at the audio input port for signal from the
sensor, while the "unplugged" icon indicates the heart rate monitor is off. Pressing the SQUARE button will
simulate one heart beat whether the input is on or off. The displayed heart rate is announced at ten second
intervals any time Time Baby is in this subdisplay mode.
When the Heart Rate Monitor is deactivated, a graph will display a possible 80 minutes of heart rate activity.
Press the CROSS button to exit the graph display.

The heart rate monitor only functions while in heart rate monitor sub display mode, but other program features
also work in this mode. If you want to use other features (ie. Sunset monitor) at the same time, set everything
else first, and then start the heart rate monitor.

Holding the TRIANGLE button while pressing the UP arrow on the D-pad will save all user options including alarm
time to a configuration file. This file is auto loaded at startup so the user need not set these options again.
The mp3 player will be stopped if it is playing to prevent file corruption.

Holding the TRIANGLE button for three seconds with the plasma/fire display active will toggle a clock set mode.
The PSP clock time can be set in this mode. Pressing LEFT or RIGHT on the D-pad while in clock set mode will
select either hours, minutes, or seconds to be set by pressing either UP or DOWN on the D-pad.
Pressing the CIRCLE button while in clock set mode selects from two different alarm sounds.
To exit clock set mode, hold the TRIANGLE button for a second. START and SELECT are ignored in clock set mode.

Pressing the SQUARE button in clock set mode activates the auto GPS clock set routine.
Time Baby will acquire the time from a suitable serial GPS mouse at 38400 baud.
If there is a communication error, or GPS incompatibility that causes an error, the GPS mode will exit,
and manual clock set mode will resume. A message may be displayed on the sub display if your GPS is connected,
but you don't yet have a position fix, or the GPS is communicating at the wrong baud rate.
If the GPS time set feature is successful, the PSP biult in real time clock will be set to within one second
of the time aquired from the GPS. This accuracy margin may be improved for a later release.
If a properly configured Garmin GPS18PC unit is connected, the user loacation, will be auto set also,
as well as the timezone offset in the PSP registry.

Pressing LEFT or RIGHT on the D-pad while in World Time Clock mode will cause the map to move sideways at fast
speed, revealing parts of the map that do not fit on the screen. Moving the analogue stick while in this mode
controls the blinking crosshair you see over the map. The time is shown for the zone the crosshair points to.
Pressing the CIRCLE button while in World Time Clock mode alternates between colour and grayscale versions of
the world map graphic. The selected map graphic is saved with other user options. The SQUARE button activates
time zone highlighting for all maps while it is held down.

Pressing the CIRCLE button while in Solar Power monitor mode will reset the graphic log and resume logging.
Pressing the TRIANGLE button while in Solar Power monitor mode will breifly display the current time scale
of the log. Pressing SQUARE in this mode will toggle the battery percentage display.

Pressing the CIRCLE button in Stopwatch mode will start or stop the displayed time.
Pressing TRIANGLE button in Stopwatch mode will reset the displayed time.
The stopwatch timer is paused any time the mp3 file browser is active.

Pressing the CIRCLE button while in MP3 Player sub display mode will activate the mp3 file browser where you can
scroll up and down with the directional pad, and add tracks to the playlist with the CIRCLE button. Pressing
CROSS will exit the file browser, and begin the playlist. Alternatively, you can press CROSS to play a single track.

Pressing LEFT or RIGHT on the directional pad while a playlist is active will skip tracks in either direction.
The Headphone remote also offers respective functionality if it was plugged in when the program was started.
Pressing SQUARE while a playlist is active will end the playlist, and display the currently selected track.
Pressing the TRIANGLE button while a single track is playing will stop the current track, and play the last track
that was written to the Memorry Stick. The TRIANGLE button can also be used to instantly play the last added track.

Pressing the NOTE button located on the front face of the PSP next to the display brightness button will
save a screen capture to the root directory of the memory stick. Saving another capture will overwrite the last.
The mp3 player will be stopped if it is playing to prevent file corruption.

Holding down the HOME button will cause the program to exit in any screen. If you continue to hold the HOME button
for a few seconds after the "exit" message is heard, the PSP will exit and also power down.

If you use the power switch to enter either suspend or standby mode, the alarm is not activated, and the PSP
unit will not wake itself up even if you have activated the alarm within the program with the CIRCLE button.

iRshell auto detection mode -
Time Baby no longer runs under iRshell. This was no longer needed after the mp3 player was implemented.
If you launch Time Baby from within iRshell, the program will auto exit after the intro screen.


       ************************************** Heart Rate Monitor **************************************


The sensor used for the heart rate monitor is not commercialy available, but it is easy to make.
A coil of wire is connected between the PSP microphone input, and audio ground. I then wrapped the coil
in heatshrink tubing as seen in the picture, and the sensor can then be fixed anywhere close to a chest
transmitter unit. Mine also works if I position the sensor outside the clothing, so it could be pinned
to a shirt, or attached to an earphone lanyard if that is held in place. Velcro might also be of use here.

The chest transmitter is part of a cheap commercial product that also contains a wristwatch reciever.

Version 2 of the original program is found here: http://dl.qj.net/General-Apps/pg/12/fid/14384/catid/151
You can also view my first video demonstration of the low resolution heart rate monitor here on YouTube:
http://www.youtube.com/watch?v=YXMd_nauh4Y

If the Heart Rate Monitor mode is used in any program session, a heart rate log can be saved on exit.
This log file contains an entry for each heart rate that was announced (evey ten seconds) during your
workout session, and is represented as one hexidecimal value for each entry. The first six bytes of the
log file is a decimal representation of the session start time, which is the time the heart rate monitor
was activated. The log file is saved as "session.log" in the Time Baby program directory, and the file
will be overwritten if a new session is started. The log file is only saved if the status byte in the
configuration file is hex edited to any value other than zero. See the file "Memory_Map.png" included
with this program package. This feature is intended for use with possible external graphing programs.

Check out these links for information on heart rate monitoring for fitness training:

http://home.vicnet.net.au/~webcoach/heartm.htm
http://www.polar.fi/polar/channels/eng/polar/about_hrm.html


       *********************************** Serial GPS Functionality ***********************************

Time Baby provides a serial GPS feature allowing the connection, and use of a Garmin GPS18PC unit to auto
set the time, date, and the users location which is used for sun, moon, and local time calculations.
This feature also sets the timezone in the PSP registry.

Serial GPS functionality is tested with a Garmin GPS 18PC connected via the DIY serial interface outlined
in an image provided with this program package. Another image shows an example of the GPS connected to a PSP.
Compatibility with other GPS units will be unlikely, unless the NMEA output sentences are identical to
that of the unit tested. Time Baby used a custom NMEA sentence parser that relies on fixed length parameters.


       ***************************** Infrared Remote Control Functionality ****************************


Time Baby V13 and any later versions provide functionality to respond to any infrared remote control that
you have laying about. Just aim at the PSP IR receiver, and push any button, and you will hear the time
announced as you would hear when you push the CROSS button. If the alarm is sounding, it will be cancelled.

If an MP3 Playlist is in session, the time will not be announced, but the track will skip ahead.

The program will not respond to button pushes that are too close together, you must wait a second or two
between each button push due to the nature of the infrared implementation.


       ************ Alarm Triggered Pronto Compatible Infrared Remote Control Functionality ***********


Thanks to AhMan (author of iRShell), Time Baby is able to send Philips Pronto compatible infrared remote
control codes to another device at the time set for the alarm. The default infrared code is for Pentax
Optio digital cameras, but it is possible to use other devices supported by iRShell by editing the file
"prontocode.tb", making it possible to wake to your TV or stereo instead of the normal Time Baby alarm.
The prontocode file may be hex edited to match a single infrared code from any iRShell compatible rdf file.
A large collection of rdf files can be found here:
http://dl.qj.net/Pronto-Codes-(2000+-infrared-devices)-PSP-Homebrew-Applications/pg/12/fid/14757/catid/151


       ***************************** PSP Alarm and Clock Setting Libraries ****************************


The PSP Alarm library used by this program to handle alarm events where the PSP is in standby or suspend
modes was written and kindly supplied to me by Adrahil of ps2dev.org forums, and PSP Updates forums (qj).
It is in it's early stages (PSPAlarm v0.00000000000000000001a!), and Time Baby was it's public debut.

Time Baby also uses a library supplied by Adrahil for setting the PSP clock at program run time.
Don't forget to thank Adrahil if you use these functionalities!


       **********************************  iRshell libmad MP3 Player **********************************


The second mp3 player implementation is the same as used in Ahman's iRshell. It can play all regular mp3s,
but use of it will cause the program to overclock the PSP unit to 280/280/140 MHz for the rest of the
program session. It is based on original code by Yoyofr & ZeLurker from neogeoCD 0.91, and customised by
Ahman for iRshell.

This implementation supports the headphone remote.
You can skip tracks fowards or backward, pause, and resume, and use volume up and down.

To use the MP3 player sleep mode, press START while you are in the MP3 file browser.
Then when the playlist has finished, the PSP will be suspended to wake up with the alarm (if activated),
and the same playlist will be restarted as the alarm sounds.


       **************************** Sunrise/Sunset & Moon Phase Algorithms ****************************


The algorithm for moon phase calculation is based on the first example found here:
http://www.voidware.com/moon_phase.htm This routine is written by Hugh Steers, and is accurate for longer
than the life of the PSP unit's real time clock which expires at the year 2100.

The algorithm for Sunrise and Sunset calculation is a condensed version of that found on this page:
http://www.sci.fi/~benefon/rscalc.c This routine is written by Jarmo Lammi, and is accurate for the life
of the PSP unit's real time clock.

The algorithm for Moon rise and Moon set calculation is based on a BASIC program that appeared in 
Sky & Telescope Magazine, July 1989, Page 78. It's original author is unknown, and cannot be credited.
The original BASIC program listing "moonrise.bas" can be found here:
http://www.schoepski.com/states/illinois/solunar/code/moonrise.htm
I first converted the original BASIC program to a PGM file for use with a PSP Commodore 64 emulator:
http://perso.numericable.fr/~ckckck/C64_PSPVice.html
(PSPVice) for testing on 19/01/08, and released that demo here:
http://forums.qj.net/f-psp-development-forum-11/t-c64-moon-rise-set-calculator-132968.html
I had it converted to C source code the next day ready for the Time Baby implementation.
The moon times algorithm initially gave me greif because it expects the time zone expressed as hours
west of Greenwich rather than hours east of Greenwich.


       *********************************** Solar Power Monitor Mode ***********************************


The Solar Power Monitor Mode is intended for use with a solar charger connected directly to the PSP's
power socket. Remember if you purchase a solar panel to make your own charger, use a 5 Volt regulator.
You can use a PSP car cigarette lighter adapter as a 5 Volt regulator so you can use the solar panel to
directly charge the PSP's internal battery.

This is possible because the PSP has a biult in charge controller which maintains the PSP battery,
and prevents it from overcharging. This is half of the work that a large solar installation has to do,
if it doesn't need to provide mains rated power for household appliances.

When in Solar Power Monitor subdisplay mode, you will see a flowing graph made of dots which indicate
the battery charge condition. If the graph dot is at the bottom, the PSP is not receiving enough power
at the power socket to charge the internal battery. If the graph dot is at the top, the PSP is receiving
enough power at the power socket to charge the PSP's internal battey where it is assumed you have a
regulated solar charger connected.

The graph will sample the light/power condition every interval, and the graph will move a little to the left.
When the subscreen is filled by the graph, it is auto scaled to a longer time frame right up
until the display shows almost the last fifteen hours of sunlight activity. None of this data is ever saved.
Using regular program features will not interfere with the operation of the Solar Power Monitor.
A few specialised routines such as setting the PSP clock with a serial GPS unit, saving your configuration,
and setting the colour to use are exceptions to the above.

The Solar Power Monitor Mode was begun, and mostly written in the Australian bush, using solar power to run
both the laptop for programming, and the PSP for testing!


       ************************************** Stopwatch Mode ******************************************


The PSP now has a centisecond (1/100th of a second) accurate stopwatch, thanks to the Time Baby V9 update.

To use the Stopwatch, navigate to the Stopwatch subdisplay mode, and press the Circle button when you are
ready to start. The next press of the CIRCLE button will stop the time. The TRIANGLE button will reset the
time whether is is stopped or running, so be careful you are familiar with the controls before using it at
any important event.

Thanks to a few programming tricks, the Stopwatch feature can run out of sync with the PSP real time clock,
and will not be affected if you use other regular Time Baby functions while it is counting.
A few specialised routines such as setting the PSP clock with a serial GPS unit, saving your configuration,
and setting the colour to use are exceptions to the above.


       ************************************ Plasma Screensaver ****************************************


A full screen plasma display is activated when you move the WLAN switch from whatever position it was in
when the program was first started. All face buttons are disabled in this mode, except CROSS which resets
the user defined plasma settings, and HOME, which will still exit the program. THe left and right trigger
buttons can still be used to announce the time. The program is still operating underneath the screensaver,
so features such as alarm, and auto time announcement will still work. The full screen plasma screensaver
is not activated in plasma clock display mode, but the WLAN switch can still be used to lock the buttons.



       ************************************ Custom Backgrounds ****************************************


Time Baby V11 and later provide support for user supplied background images.
Simply copy a png file named background.png with dimensions 480x272 into the program folder,
and it will be auto detected, and used by the program in all but the plasma/fire display screen.
Some examples, including an aluminuim checkerplate texture have been provided with this package.
To activate your background, press Triangle in the colour adjustment mode. Background activation
status will be saved with user preferences.


       *************************************** Other Credits ******************************************


Thanks to lteixeira and for providing the PSP audio input library used for the heart rate monitor feature
of this program, NoRiGoLo for doing some of the work in converting the main graphic font to png images,
and thanks to califrag for GPS testing with the Holux (although no success with Holux recievers yet).
The heartbeat sound sample used in heart rate monitor mode is produced by JohnC, and is a public domain sample.
The intro music used from Time Baby V13 and later is a shortened public domain track with unknown author.
The plasma effect used in Time Baby is based on code ported to the PSP by Armon Khosravi, and released on
pspprogramming.com. It's original source is unknown. The fire effect is based on code ported to the PSP
by Fanjita, and originaly written by Midnight. Modifications to both effects for this program by Art.
The mp3 file browser was written by Anonymous Tipster of ps2dev.org, jono of pspprogramming.com, and Art.


       **************************************** Easter Eggs *******************************************


Watch out for hidden Easter Eggs in Time Baby releases. I might not give all of them away!
Although some previous Easter eggs have been removed, one was added for the V11b release.


       *************************************** Known Issues *******************************************


The stopwatch timer, if in use, is paused while the mp3 file browser is open, and resumed when you return to
any clock mode. It is advised that you set up your playlist prior to using the stopwatch to avoid inaccuracy.

The current auto time zoning implementation for Sunrise/Sunset mode, and World time modes do not currently 
support non-standard time zones (time offsets that contain a number of minutes other than zero).

The world time clock's method of separating GMT+12 hour and GMT-12 hour time zones does not follow the
international date line exactly, but runs in a straight line at 180 degrees longitude. The international date
line (as described here: http://aa.usno.navy.mil/faq/docs/international_date.html), bends around continents.

Time zones observing Daylight Savings are currently not fully supported.
Although you will see the correct local time, Other calculated times will have a variance of one hour,
such as the times given on the world time clock mode, and possibly the Sunrise and Sunset modes.

The Sunrise/Sunset and Moonrise/Moonset algorithms implemented in Time Baby may give erroneous results,
or no results at all for locations of extremely high latitude (ie. very close to the North pole).


       ********************************** Time Baby YouTube Videos ************************************


A number of videos have been uploaded to YouTube to demonstrate various features as they were implemented:

Heart Rate Monitor - Part One:                            Heart Rate Monitor - Part Two:
http://www.youtube.com/watch?v=_S90fFCNpys                http://www.youtube.com/watch?v=dhxFqlQqIH8

Time Baby GPS Time Set - Part One:                        Time Baby GPS Time Set - Part Two:
http://www.youtube.com/watch?v=flyNJbiwDzU                http://www.youtube.com/watch?v=g0pNOfaCBJY

World Time Clock:                                         Solar Power Monitor Mode:
http://www.youtube.com/watch?v=T-aUQ-3LrlE                http://au.youtube.com/watch?v=F83HilBV7CI

Moonrise & Moonset Time Calculator:                       Plasma Clock Display:
http://au.youtube.com/watch?v=Ye243VFShAs                 http://au.youtube.com/watch?v=28pnnn0vPuk

MAD Playlist MP3 Player Demo:                             Fire Clock Display:
http://au.youtube.com/watch?v=XDMi35jFTzA                 http://au.youtube.com/watch?v=mNsYOnuQoks

Alarm Triggered Infrared Control of External Device:      World Local Time Demo:
http://au.youtube.com/watch?v=F5qIY_eQoFQ                 http://au.youtube.com/watch?v=g0kr7hbN744


Unfortunately, many of these videos were produced before antialiased graphics were implemented,
so edges of the digits might look a little rough, even for YouTube videos.


       ************************************* Time Baby Web Page ***************************************


The Time Baby Program has had it's own web page since it's earlier versions were released to the public.
Check it out here: http://www.freewebs.com/defxev/TimeBaby.htm


       ***************************************** Donations ********************************************


*Donations*
License to use this program will remain free, but I am accepting donations toward new hardware and development.
You can encourage future program and/or hardware development by sending a donation. Contact me on the PSPU,
Austech, or these other listed forums. My user name is Art on all of them, or click the donation link on any of
my project web pages. I would actually prefer you keep your money though. See below.

I have valuable use for low capacity Memory Sticks for programming. If you like this program,
please consider donating the 32Mb Memory Stick that came with your PSP once you have upgraded,
or perhaps the low capacity Memory Stick that comes with some Sony Ericsson mobile phones.

Thanks goes out to Jason & Jared, a Father & Son team from QJnet forums for being the first to donate a pair
of Memory Sticks! It's much appreciated! :) Keep up the green electronics projects!
Thanks also to MjW, Moose Island, and lifey for their kind donations of PSP Memory Sticks.

Donate a Memory Stick, and see your nickname on the plasma greetings screen.
Cheers, Art.

http://forums.ps2dev.org/viewforum.php?f=14
http://forums.qj.net/f-qjnet-sony-psp-forums-48.html/
http://www.dcemu.co.uk/vbulletin/index.php
http://www.psp-programming.com/forums/
http://www.psphacking101.com/forum/index.php?c=1
http://www.freewebs.com/defxev/


       ************************************ Program History Log ***************************************

VERSION HISTORY:

V15d (20/05/08):
- Further saving of RAM to address running out of memory issue for people with plugins enabled.
- Selection between background wallpaper and custom colour is possible when a wallpaper is present.

V15c (13/05/08):
- Added graphic progress bar for loading graphics, configuration, and program modules.
- Improved mp3 title scrolling for Mad MP3 Player subdisplay. Title length is now accounted for.
- Added mp3 track title scroller in plasma screensaver when started from mp3 player sub display mode.
- Removed file extensions from mp3 title displays.
- Various code fixes and improvements.

V15b (12/05/08):
- Fixed optional background image feature.
- Cosmetic improvements with Intrafont for some more subdisplay modes
- Analogue stick now works in the MP3 file browser.

V15 (10/05/08):
- World Local Time feature now sets the PSP timezone thanks to SilverSpring for the sample registry code.
- Implemented Intrafont by BenHur. The mp3 player subdisplay uses Intrafont for a large scrolling title display,
  and most of the program's use of debug text is replaced with the PSP's built in font.
- Implemented mp3 player feature to instant play last track copied to the Memory Stick inspired by the Nokia N95 phone.
- Implemented sliding bar feature for the START and SELECT buttons so the alarms are not accidentally activated.
- Fix to prevent HOME button from exiting in plasma screensaver mode. HOME button is ignored like the other buttons.

V14d (02/05/08):
- Small improvement to X-Flash style HOME button program exit and power off selector.

V14c (02/05/08):
- Implemented a new GPS feature that sets user location aquired from GPS, and determines the local time
  based on the relative world time zone map position. This automatic process is displayed graphically.
- Added screen tint effect when using the HOME button to exit.
- HOME button can now be used to cancel the alarm.
- Power LED flashes while alarm is sounding if the unit is running from battery power.
- Implemented X-Flash style HOME button program exit and power off selector.

V14b (17/04/08):
- Added alarm mode to send five "shoot" infrared codes to a Pentax Optio camera spaced five seconds apart.
- Removed posible debugging artifact in alarm subdisplay mode while infrared graphic is being displayed.
- Bugfix so the circle button is no longer ignored the first time it is pressed in alarm sub display mode.
- Current time scale is now auto displayed when the Solar Power Monitor sub display mode is selected.
- Various improvements to Alarm, Stopwatch, and Heart Rate Monitor sub display mode graphics.
- Minor code optimisation.

V14 (10/04/08):
- Implemented alarm activated Pronto infrared remote control feature provided by AhMan.
- Small change so the TRIANGLE button toggles the Sunset time monitor in the Sunrise/set subdisplay mode.
- Program now checks for free space on Memory Stick prior to writing program support files on first use.
- Added secret intro skip method for Memory Stick donators which can be saved with user configuration.

V13e (01/04/08):
- Fix to mp3 file browser where only a few mp3 files are present on the Memory Stick.
- Session log implemented for heart rate monitor mode. File is saved as "session.log" if configured.
- Workout graph implememted for Heart Rate Monitor. Graph displays up to 80 minutes of activity.
- Various code optimisation.

V13d (29/03/08):
- Improvement to track skip feature to try to prevent multiple track being skipped at once.
- Headphone remote hold switch is implemented.

V13c (28/03/08):
- Improvement to list mp3 files in alphabetic order for the MP3 Player file browser.
- Fix to prevent subfolder being entered into mp3 playlist therefore preventing subsequent crash.
- Improvement to prevent any tracks from being entered into the mp3 playlist more than once.
- Graphic indication of sleep mode is given in MP3 Player sub display mode.
- All tracks selected for mp3 playlist now remain highlighted as the browser scrolls like iRshell.
- MP3 playlist number is spoken through the headphones when the headphone remote is used to skip tracks.

V13b (25/03/08):
- Fixed mp3 Pause using headphone remote control. The problem was introduced with the previous update.
- Added battery percentage indication to solar monitor display.

V13 (17/03/08):
- Fix to previous track function where PSP crashed if skipped back past first playlist track.
- Original PSP-120 headphone remote now supported.
- Basic infrared remote control feature implemented.
- Default configuration file is written to Memory Stick if it is not present at program startup.
- MP3.prx (irsmp3.prx) program file is written to Memory Stick if it is not present at program startup.
- Cooleyes' Media Engine MP3 player is used only for the intro music, and removed from the alarm function.
- MP3 alarm feature will now wake the PSP and resume the active mp3 playlist.
- Code optimisations.

V12i (13/03/08):
- Implemented optional echo effect for in program voice. This does not include the mp3 player or sound effects.
- Improved performance of full screen Plasma Screensaver.
- Fixed wake from standby bug for MP3 Player. MP3 will no longer hang when woken from standby during playlist.

V12h (11/03/08):
- Inverted highlighting for mp3 file browser is easier to see in sunlight.
- Title display scrolling enhancement in mp3 Player subdisplay mode.
- Reordered sub display modes for more logical progression.

V12g (04/03/08):
- MP3 Player sleep mode implemented. PSP is suspended at the end of the playlist ready for the
  alarm function to wake it up in the morning. Playlist is restarted on wake up, as well alarm sounding.
- MP3 Player will stop current track in single track mode, or skip to next track in playlist mode
  when the PSP is woken from suspend with the mp3 player active.
- Implemented support for special config file that will cause the MP3 Player to be clocked at 333/333/166 MHz.
  The second last byte can be changed to any value other than zero with a hex editor to use the fast CPU speed.
- Pause button on the headphone remote will announce the time once when the track is paused.
- Headphone remote can be plugged in at any time now the serial port is only activated in GPS time set mode.
- Various code fixes.

V12f (03/03/08):
- increased sizes of mp3 file path buffers to address overflow issue.

V12e (02/03/08):
- Reduced fastest scrolling speed in mp3 browser in attempt to prevent crashing some PSPs.
- Slightly faster startup when CROSS button is held down.

V12d (01/03/08):
- MP3 Player volume control implemented for headphone remote control.
- PSP is now clocked at 280/280/140 MHz if the mp3 player is used.
- Increased mp3 playlist capacity to 50 possible tracks.
- MP3 file browser wrap around feature implemented.
- Much better scrolling control in mp3 file browser.
- Implemented playlist selection highlighting.
- Changed intro music back to the previous versions.
- Various other enhancements.

V12c (28/02/08):
- Fixed mp3 playlist feature to play in correct order instead of reverse.
- Program now auto exits if launched from iRshell.
- mp3 playlist auto repeat implemented. Auto repeat playlist is not optional.
- Next and Previous track controls implemented for mp3 player in playlist mode.
- Graphics fixes and enhancements.
- Screenshot and configuration save features stop the mp3 player to prevent file corruption.
- Program will not start mp3 file browser if the MUSIC directory is empty.
- New intro music and 6AM Sample player updated to play 11025 sample rate.
- Fixed screenshot and exit to work in the mp3 file browser.
- Headphone remote control implementation supports Pause/Resume, Next, and Previous track.

V12b (28/02/08):
- Bug fixes and stability improvements to mp3 player.
- File browser auto detects between two possible locations your XMB MUSIC folder can be located.

V12 (27/02/08):
- First implementation of irshell mp3 player with customised file browser.
- Playlist handler written from scratch.

V11c (24/02/08):
- Better fix for graphics display bug when resuming from standby.

V11b (23/02/08):
- Implemented Flamez PSP fire effect demo by Midnight, optimised and ported to PSP by Fanjita,
  modified for use with PSP graphics library, and variable positioning by Art.
- Fixed display bug when resuming from standby.
- Improved font for time announcement duration setting screen.
- Intro sequence is slightly faster than previous versions.
- Shutters open faster than they did previously in plasma clock mode.
- HOME button can be configured to power off by editing the last byte of the config file.
- Face buttons are locked when plasma screensaver is active, although the program still runs underneath.

V11 (19/02/08):
- Removed preset locations from the Sunrise and Sunset display mode since it is easy to set a location
  in the World time clock screen, and to bring it closer to the way the moon display mode works.
  The user defined location can still be fine adjusted in the same manner.
- Sideways Dpad movement in Sunrise/Sunset display mode will allow calculated previews of other dates
  the same way the Moon display mode works.
- Previews are reset to current time if UP or DOWN arrows are used to move out of Sun or Moon displays.
- Added configurable plasma clock display. Plasma display settings are saved with user profile.
- Removed multi coloured world map selection. Both grey scale maps can still be selected and saved.
- Small changes to graphics in world clock mode.
- New antialiased font has smooth edges and new font for some display modes.
- Fix to stop program saving screenshots while running under irshell so duplicates aren't created.
- Removed the 13:37 icon Easter Egg. Program has a new plasma screenshot icon.
- PSP unit is auto overclocked to 333/333Mhz when the heart rate monitor is started.
- Implemented support for a user supplied external background image.
- Plasma greetings screen implemented for Memory Stick donators.
- Pressing CROSS button no longer skips intro, but speeds it up instead.

V10e (14/02/08):
- Improvement to fly over feature where location is on edge of the screen, it is moved over a little.
- Resolution of heart rate monitor improved using a millisecond timer derived from the real time clock
  instead of using vertical blank counts in the calculation of the heart rate.
- Hysteresis implementation for the Heart Rate monitor causes it to function more smoothly.
- Added plasma screen saver feature.

V10d (25/01/08):
- Pressing the TRIANGLE button while in the World Map screen causes the fly over feature to move the
  crosshair from wherever it is, back to the location that is either currently in use, or last saved.
- Improved map grid in World Clock screen so coordinates should line up more accurately.
- Fixed slow down in intro screen, and shortened the time of the intro screen.

V10c (23/01/08):
- Fixed bug in Moonrise / Moonset implementation discovered by nicodemus82.
  Timezone parameter for moon time routine is read directly from PSP system settings rather
  than being calculated by comparing UTC and local times. Sun time routine remains unchanged.
- Introduction of debug mode for program testing in various parts of the world.
- Fix to prevent the Heart Rate Monitor from announcing "zero" when the sensor is not plugged in.
- Sound effect is now made when the saved location fly over feature reaches it's destination.

V10b (22/01/08):
- Moon phase image is flipped to represent the moon phase appearance in your hemisphere.
- Fixed 13:37 Easter Egg that was broken in the last program version.
- Initial position for the World Clock screen is my home city of Ipswich, Queensland, Australia.
- Map crosshair will fly over to the user saved location for the initial use of World Clock mode.

V10 (20/01/08):
- Implemented Moonrise and Moonset time calculator.
- Changed menu navigation sound.

V9b (19/01/08):
- Fixed bug in moon phase calculator introduced with the Solar monitor mode.
- Changed menu navigation sound.

V9 (07/01/08):
- Implemented a Stopwatch feature with Start-Stop / Reset functionality like a generic digital stopwatch.

V8d (06/01/08):
- Fixed Solar Power Monitor mode to show a positive condition only when there is enough power to
  charge the PSP's battery, not just power the PSP unit, unless the battery is full.
- Added a graphic overlay to show the current time scale of the graphic log.
- Added Long Time Display mode that displays the current month through to the current centisecond.

V8c (02/01/08):
- Improved Colour Changer screen allows smoother control, and greater range of colours.
- Code fix to keep solar monitor working in world time clock mode.
- Various code fixes.

V8b (01/01/08):
- Fixed bug from the last version that prevented the colour changer from working.
- Improved the style of Solar Power Monitor mode screen.
- Implemented auto scaling for the Solar Power Monitor screen.
- Changed time announcement routine to say "hundred" for even hour times.
- Various code fixes and optimisation.

V8 (31/12/07):
- Improved program exit method with HOME button.
- Added Solar Charger logger mode.

V7c (15/12/07):
- Added exit code so the HOME button exits to the XMB instead of shutting down the PSP unit.

V7b (08/09/07):
- Sunset monitor mode activation status is no longer saved or loaded.
  This corrects a possible problem that occured when the program was previously started in this mode.
  I have deemed it not worth fixing because of possible confusion caused if the program is started in this mode.
  A previous version config file cannot be used to load directly into Sunset monitor mode.

V7 (29/08/07):
- Implementation of graphic talking heart rate monior.

V6 (22/08/07):
- Fixed a graphics bug where aftifacts of the world map crosshair were seen in other screens if the
  cursor was placed at the bottom of the map. Part of the crosshair graphic was being drawn off the
  edge of the screen.
- Removed second alarm sound option (siren sound) and implemented cooleyes' mp3 player in it's place.

V5d (19/08/07):
- Implemented a coordinate system in the world map screen so it provides an alternative way to set the
  user's location for the Sunrise and Sunset mode.
- Added support for GMT plus and minus twelve hour time zones within the twelve hour time zone.
- World time display digits have transparent backgrounds when using the colour or grayscale maps.
- Added screen capture feature.
- Various improvements and fixes.

V5c (16/08/07):
- Added fancy startup intro screen.
- Added graphic time display to world time clock mode that follows movement of the crosshair.
- World time clock now shows the time of the last valid zone if the crosshair is sitting on a map border.
- Implemented time zone highlighting feature for the world time clock mode.
- Improved control of map and pointer movement, and added a third optional map graphic.
- Fixed sound bugs in world time clock mode, other minor fixes and code optimization.

V5b (14/08/07):
- Fix to time display in world time clock mode, and text is printed in the user option colour.
- Minor graphics fixes, and faster map movement.
- Fix to time zone routine for Sunrise and Sunset features.
- Added an alternate grayscale world map, and improved contrast between bordering colours of the colour map.

V5 (14/08/07):
- GPS Implementation. Time is acquired from a serial GPS mouse, and used to set the internal PSP clock.
- Added graphic world time clock mode that can display the time virtually anywhere in the world.
- Added alternate alarm sound option. alarm sound option is saved with user settings.
- Major fix to moon phase routine, and fix to Waxing Crescent Moon graphic.

V4g (08/08/07):
- Implementation of Adrahil's PSP clock setting library.
- Fix to rolling numbers when changing to and from Sunset monitor mode, or PSP auto resumes from suspend.
- Animated Graphic Sunset can be seen in Sunset monitor mode (animation timing is not precise).
- One day adjustment to fine tune the Moon phase routine.
- Other small improvements.

V4f (02/08/07):
- Sunset time monitor mode displays and announces the time left until sunset.
- Another fix to moon phase routine.
- Added wolf howl sound to indicate full moon.

V4e (23/07/07):
- Another bug fix to moon phase routine.
- Alarm activation status is now saved with user options.
- code optimization.

V4d (20/07/07):
- Added an improved graphic font. Thanks to NoRiGoLo for doing most of the work.
- Changed the position of the seconds display.
- Removed alarm icon when it appeared at the top left of the screen. It now only appears where it belongs.
- Improved colour setting routine.

V4c (17/07/07):
- Bug fix to moon phase calculator implementation.
- Added Sunrise and Sunset sub display mode with rooster alarm that sounds at Sunrise.
- Added day of the week sub display mode which also shows the date.
- Added time announcement duration setting to the speech window. This setting is active in all other modes,
  and saved with other user options.
- The Triangle button no longer resets the sub display mode, and the current sub display mode is now saved
  with other user options.
- All program dialogue is shown in the user selected colour for uniformity of the program interface.
- Added auto detection of iRshell. PSP clock speeds are not set by Time Baby if launched from iRshell.
- HOME button now resets the PSP unit instead of powering it down.
- Minor graphics fixes and enhancements.
- PSP unit clocked at 136/146/1.
- Added a new Easter egg for the most 1337 users to find!

V4b (08/07/07):
- Alarm is auto activated if the START button is used to suspend the PPS unit.
- Additional sub display mode allows the user to adjust the colour of all graphic digits as desired.
- Added feature to save colour and alarm time settings to configuration file.

V4 (07/07/07):
- Implemented adrahil's Alarm Library to handle alarm where the PSP is either suspended, or in standby.
- Implemented a moon phase calculator with graphic moon display accurate to one segment.
- Removed Mikmod Sound Library, and implemented 6AM Sample Player to achieve CD quality sound.
- Implemented a time announcement mode where the time is announced every minute.
- Speech routine is no longer timer based. Samples are played end to end for fluid sounding speech.
- Under clocked PSP unit to 135/111/1 for battery conservation while used with the power on.
- Removed lap counter (bean counter) feature that was present from version 2.
- Images are now present in the executable, and are loaded from memory at program startup.
- Various other graphics fixes and improvements including calendar display.

V3b (27/08/06):
- Bug fix to speech routine (Ten:Fifty-Zero!).

V3 (25/08/06):
- Speaks the time in hours and minutes.
- Lap counter sub display can be turned on or off.
- Works in real time, so no operation freezes any other operation
  (ie. display does not freeze while speaking the time, etc.).
- Tested with iRShell. Can speak the time through the headphones while an mp3 is playing.

V2:
- Implemented rolling odometer style graphic display.
- Implemented headphone remote lap counter (used to count laps, or anything, with headset remote as trigger).

V1 (20/08/06):
- Displays the time in 24 hour format with hours, minutes and seconds.


       **********************************************************************************************

